<!DOCTYPE html>
<html>
<head>
	<title>prop data</title>
	<meta charset="UTF-8">
	<script src="./vue.js"></script>
</head>
<body>
	<div id="app">
		 <child content="232wed"></child>
	</div>

	<script>
		Vue.component('child', {
			template: `<div >{{content}}</div>`,
			props: {
				content: {
					type: [String, Number],
					required: true,
					default: 'haha',
					validator: function (val) {
						return val.length > 5
					}
				}
			}
		})

		var app = new Vue({
			el: '#app'
		})
	</script>

</body>
</html>